package com.platform.car.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 地图请求 Controller
 * @author JiangXueLi
 * @version 1.0
 */
@Controller
@RequestMapping("/car/map")
public class MapController {
    /**
     * 打开百度地图页面(第一次)
     * @return 百度地图页面
     */
    @RequestMapping(value="/baidu")
    private String baidu(){ return  "/car/map/map.jsp";}


    /**
     * 选择地图
     * @param lat 纬度
     * @param lng 经度
     * @param resAddress
     * @param modelMap
     * @return
     */
    @RequestMapping(value="/otherBaidu")
    private String otherBaidu(@RequestParam String lat, @RequestParam String lng, @RequestParam String resAddress, ModelMap modelMap){
        modelMap.put("resLat",lat);
        modelMap.put("resLng",lng);
        modelMap.put("resAddress",resAddress);
        return "/car/map/otherMap.jsp";
    }
}
